﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using LeonardoNews.Models;

namespace LeonardoNews.Server.Models.ArticleModels
{
    public class UserModel
    {
        public int ID { get; set; }

        public string Username { get; set; }

        public string Role { get; set; }

        public static UserModel FromUser(User user) 
        {
            return new UserModel()
                {
                    ID = user.ID,
                    Username = user.Username,
                    Role = user.Role
                };
        }
    }
}